package src.edu.wayne.cs.csc4110.hw6.implementations.stateMachine;

import src.edu.wayne.cs.csc4110.hw6.implementations.userPanels.PanelFactoryImpl;

public class RegisterState extends AbstractState {
	
	public RegisterState(StateMachine stateMachine)
	{
		super(stateMachine);
	}
	

	@Override
	public void goToLoggedInState() {
		if (stateMachine.getCurrentUser() != null)
		{
			stateMachine.setState(stateMachine.getLoggedInState());
			stateMachine.goToLoggedInState();			
		}
		else
		{
			stateMachine.setState(stateMachine.getNotLoggedInState());
			stateMachine.goToNotLoggedInState();
		}
	}

	@Override
	public void goToRegisterState() {
		PanelFactoryImpl.getUserRegisterPanel(stateMachine);
	}

	@Override
	public void goToNotLoggedInState() {
		// TODO Auto-generated method stub
		
	}

}
